/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import pojo.VeChuyenBayPOJO;

/**
 *
 * @author b2
 */
public class VeChuyenBayDAO {

    public static boolean themVeChuyenBay(VeChuyenBayPOJO ve) {
        boolean kq = false;
        String sql = String.format("INSERT INTO VECHUYENBAY (`MACHUYENBAY`,`MAHANHKHACH`,`MAHANGVE`,`GIATIEN`) VALUES ('%s','%s','%s','%s');",ve.getMaChuyenBay(),ve.getmHanhKhach(),ve.getMaHangVe(),ve.getGiaTien());
        MySqlDataAccessHelper helper =  new MySqlDataAccessHelper();
        helper.open();
        int n = helper.executeUpdate(sql);
        if(n == 1){
            kq = true;
        }
        helper.close();
        return kq;
    }
}
